import request from "../../http";
const indexApi = {
  async getIndexData() {
    return request({
      url: "/api/supplier/indexInfo",
      method: "get"
    });
  },
  async changePhone(params) {
    return request({
      url: "/api/supplier/front",
      method: "post",
      data: params
    });
  },
  async checkCode(params) {
    return request({
      url: "/api/checkSend",
      method: "post",
      data: params
    });
  },
  async removeWechat(params) {
    return request({
      url: "/api/user/unbind",
      method: "post",
      data: params
    });
  },
  async getLoginLog(query) {
    return request({
      url: `/api/loginLog/${query.userId}`,
      method: "get",
      params: query
    });
  },
  async getShopData() {
    return request({
      url: "/api/supplier/indexInfo",
      method: "get"
    });
  },
  // 供应商
  async getFlowData(query) {
    return request({
      url: "/api/supplier/flowData",
      method: "get",
      params:query
    });
  }
};

export default indexApi;
